From 2744dca1f4591eea1bd5e01a426eaf94f6bbda9c Mon Sep 17 00:00:00 2001 From: Debian LibreOffice Maintainers Date: Mon, 27 Aug 2012 16:47:58 +0000 Subject: [PATCH] mention-java-common-package =================================================================== Gbp-Pq: Name mention-java-common-package.diff --- jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx | 3 +++ svtools/source/java/javainteractionhandler.cxx | 12 +++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx index f72caeb9d62..58266a6c56e 100644 --- a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx +++ b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx @@ -169,6 +169,9 @@ static bool findAndSelect(JavaInfo ** ppInfo) if (errcode == JFW_E_NO_JAVA_FOUND) { fprintf(stderr,"javaldx: Could not find a Java Runtime Environment! \n"); + fprintf(stderr,"Please ensure that a JVM and the package libreoffice-java-common\n"); + fprintf(stderr,"is installed.\n"); + fprintf(stderr,"If it is already installed then try removing ~/.libreoffice/3/user/config/javasettings_Linux_*.xml\n"); return false; } else if (errcode != JFW_E_NONE && errcode != JFW_E_DIRECT_MODE) diff --git a/svtools/source/java/javainteractionhandler.cxx b/svtools/source/java/javainteractionhandler.cxx index 9569ff29512..7845b77513e 100644 --- a/svtools/source/java/javainteractionhandler.cxx +++ b/svtools/source/java/javainteractionhandler.cxx @@ -50,9 +50,10 @@ #include #include +#define DEFINE_CONST_UNICODE(CONSTASCII) UniString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII)) + using namespace com::sun::star::uno; using namespace com::sun::star::task; - namespace svt { @@ -157,6 +158,9 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque #endif String aTitle( SvtResId(STR_WARNING_INVALIDJAVASETTINGS)); aWarningBox.SetText( aTitle ); + String aText = String(aWarningBox.GetMessText()); + aText.Append(DEFINE_CONST_UNICODE("\nPlease install the libreoffice-java-common package for this functionality.")); + aWarningBox.SetMessText( aText ); nResult = aWarningBox.Execute(); } else @@ -174,6 +178,9 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque QueryBox aQueryBox( NULL, SvtResId( QBX_JAVADISABLED ) ); String aTitle( SvtResId( STR_QUESTION_JAVADISABLED ) ); aQueryBox.SetText( aTitle ); + String aText = String(aQueryBox.GetMessText()); + aText.Append(DEFINE_CONST_UNICODE("\nPlease install the libreoffice-java-common package for this functionality.")); + aQueryBox.SetMessText( aText ); nResult = aQueryBox.Execute(); if ( nResult == RET_YES ) { @@ -220,6 +227,9 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque ErrorBox aErrorBox(NULL, SvtResId( ERRORBOX_RESTARTREQUIRED ) ); String aTitle( SvtResId( STR_ERROR_RESTARTREQUIRED ) ); aErrorBox.SetText( aTitle ); + String aText = String(aErrorBox.GetMessText()); + aText.Append(DEFINE_CONST_UNICODE("\nPlease install the libreoffice-java-common package for this functionality.")); + aErrorBox.SetMessText( aText ); nResult = aErrorBox.Execute(); } else -- 2.30.2